#include "Mutex.hpp"

#include <cstddef>
#include <iostream>
#include <pthread.h>
using std::cout;
using std::endl;

namespace tp{

Mutex::Mutex(){
    pthread_mutex_init(&_mutex,NULL);
}

Mutex::~Mutex(){
    pthread_mutex_destroy(&_mutex);
}


void Mutex::lock(){
    pthread_mutex_lock(&_mutex);
}

void Mutex::unlock(){
    pthread_mutex_unlock(&_mutex);
}

pthread_mutex_t* Mutex::get_mutex_ptr(){
    return &_mutex;
}

}





